# def should_query_mysql(question):
#     # 编写逻辑来确定是否应该查询 MySQL
#     # 返回 True 或 False
#
# final_chain = (
#     RunnablePassthrough.assign(question=question)
#     .assign(should_query=should_query_mysql)
#     .branch(
#         branch_true=(
#             RunnablePassthrough.assign(query=sql_response)
#             .assign(result=itemgetter("query") | execute_query)
#             | answer
#         ),
#         branch_false=(
#             answer
#         )
#     )
# )
